/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Client.geass.gui.planGUI;

import java.awt.CardLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.ListSelectionModel;
import javax.swing.ScrollPaneConstants;
import javax.swing.table.DefaultTableModel;

import net.sourceforge.jtimepiece.JTimepiece;

import org.jdesktop.swingx.JXDatePicker;

import Client.geass.clientController.planController.GuiCreatePlanController;
import Client.geass.clientController.planController.GuiModifyPlanController;
import Client.geass.gui.travellerGUI.TravellerFrame;
import Shared.geass.dataPOJO.Plan;

/**
 *
 * @author Kaya Wai
 */
public class SetPlanPanel extends javax.swing.JPanel {
    
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Plan plan;
    private String selectedCountryname;
    private TravellerFrame parent;
    //private MapFrame mf = new MapFrame();
	private JLabel mapPicture;
    
    public SetPlanPanel(TravellerFrame parent,Plan plan) {
        this.plan = plan;
        this.parent = parent;
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        searchResultDialog = new javax.swing.JDialog();
        titlePlan = new javax.swing.JPanel();
        titleLb = new javax.swing.JLabel();
        headerPanel = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        mapPanel = new javax.swing.JPanel();
        mapPicture = new javax.swing.JLabel();
        jPanel9 = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        searchPanel = new javax.swing.JPanel();
        searchCity = new javax.swing.JTextField();
        searchDate = new JXDatePicker();
        searchButton = new javax.swing.JButton();
        addPanel = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        addContentPanel = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        beginHourField = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        beginMinField = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        endHourField = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        endMinField = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        siteField = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        transportField = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        breakfastField = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        lunchField = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        dinnerField = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        commentScrollPane = new javax.swing.JScrollPane();
        commentField = new javax.swing.JTextArea();
        submitNew = new javax.swing.JButton();
        clearButton = new javax.swing.JButton();
        countrySelector = new javax.swing.JComboBox();
        jLabel10 = new javax.swing.JLabel();
        citySelector = new javax.swing.JComboBox();
        jLabel21 = new javax.swing.JLabel();
        dateSelector = new javax.swing.JComboBox();
        tablePanel = new javax.swing.JPanel();
        jPanel13 = new javax.swing.JPanel();
        jumpDateSelector = new javax.swing.JComboBox();
        jumpButton = new javax.swing.JButton();
        tableScrollPane = new javax.swing.JScrollPane();
        table = new javax.swing.JTable();
        jPanel11 = new javax.swing.JPanel();
        cancel = new javax.swing.JButton();
        sumbitButton = new javax.swing.JButton();

        //------------------不要先设置searchResultDialog--------------
        /*searchResultDialog.setPreferredSize(new java.awt.Dimension(850, 1000));
        searchResultDialog.setResizable(false);

        javax.swing.GroupLayout searchResultDialogLayout = new javax.swing.GroupLayout(searchResultDialog.getContentPane());
        searchResultDialog.getContentPane().setLayout(searchResultDialogLayout);
        searchResultDialogLayout.setHorizontalGroup(
            searchResultDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 850, Short.MAX_VALUE)
        );
        searchResultDialogLayout.setVerticalGroup(
            searchResultDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1000, Short.MAX_VALUE)
        );searchResultDialog.getContentPane().add(new DisplaySearchedPlanListPanelNetbeans());*/
        
      //----------------------------------------------------------------------------

        setFont(new java.awt.Font("微软雅黑", 0, 12)); // NOI18N
        setPreferredSize(new java.awt.Dimension(850, 1000));

        titlePlan.setPreferredSize(new java.awt.Dimension(0, 40));

        titleLb.setFont(new java.awt.Font("长城特粗黑体", 0, 24)); // NOI18N
        titleLb.setText("设置计划日程");
        titlePlan.add(titleLb);

        headerPanel.setFont(new java.awt.Font("华文细黑", 0, 14)); // NOI18N
        headerPanel.setPreferredSize(new java.awt.Dimension(0, 30));
        headerPanel.setLayout(new java.awt.GridLayout(1, 0));

        jPanel1.setPreferredSize(new java.awt.Dimension(260, 30));

        jLabel1.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel1.setText("计划标题  ");
        jPanel1.add(jLabel1);

        jLabel2.setText(plan.getPlantitle());
        jPanel1.add(jLabel2);

        headerPanel.add(jPanel1);

        jPanel2.setPreferredSize(new java.awt.Dimension(260, 30));

        jLabel3.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel3.setText("开始日期  ");
        jPanel2.add(jLabel3);

        JTimepiece t = new JTimepiece();
        jLabel4.setText(t.convertDateToString(plan.getStartdate(), "yyyy'年'MM'月'dd'日'"));
        jPanel2.add(jLabel4);

        headerPanel.add(jPanel2);

        jPanel3.setPreferredSize(new java.awt.Dimension(260, 30));

        jLabel5.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel5.setText("结束日期  ");
        jPanel3.add(jLabel5);

        jLabel6.setText(t.convertDateToString(plan.getEnddate(), "yyyy'年'MM'月'dd'日'"));
        jPanel3.add(jLabel6);

        headerPanel.add(jPanel3);

        mapPanel.setPreferredSize(new java.awt.Dimension(400, 400));
        mapPanel.setLayout(new javax.swing.BoxLayout(mapPanel, javax.swing.BoxLayout.Y_AXIS));
        
        mapPicture.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Client/geass//gui/picture/map.jpg")));
        mapPicture.setMaximumSize(new java.awt.Dimension(400, 400));
        mapPicture.setMinimumSize(new java.awt.Dimension(400, 400));
        mapPicture.setPreferredSize(new java.awt.Dimension(400,400));
        
        mapPanel.add(mapPicture);
        
        jPanel9.setPreferredSize(new java.awt.Dimension(400, 30));
        jPanel9.setRequestFocusEnabled(false);

        jLabel11.setFont(new java.awt.Font("长城特粗黑体", 0, 18)); // NOI18N
        jLabel11.setText("查看地图");
        jPanel9.add(jLabel11);

        mapPanel.add(jPanel9);

        jPanel10.setPreferredSize(new java.awt.Dimension(400, 400));

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 461, Short.MAX_VALUE)
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 365, Short.MAX_VALUE)
        );

        mapPanel.add(jPanel10);

        searchPanel.setPreferredSize(new java.awt.Dimension(400, 48));
        java.awt.GridBagLayout jPanel6Layout = new java.awt.GridBagLayout();
        jPanel6Layout.columnWidths = new int[] {0, 10, 0, 10, 0};
        jPanel6Layout.rowHeights = new int[] {0};
        searchPanel.setLayout(jPanel6Layout);

        searchCity.setForeground(new java.awt.Color(153, 153, 153));
        searchCity.setText("请输入城市名称");
        searchCity.setPreferredSize(new java.awt.Dimension(100, 30));
        searchCity.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                searchCityFocusGained(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        searchPanel.add(searchCity, gridBagConstraints);

        //searchDate.setText("jTextField3");
        searchDate.setPreferredSize(new java.awt.Dimension(140, 30));
/*        searchDate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchDateActionPerformed(evt);
            }
        });*/
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        searchPanel.add(searchDate, gridBagConstraints);

        searchButton.setText("搜索计划");
        searchButton.setPreferredSize(new java.awt.Dimension(80, 30));
        searchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
					searchButtonActionPerformed(evt);
				} catch (IOException e) {
					e.printStackTrace();
				}
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 0;
        searchPanel.add(searchButton, gridBagConstraints);

        mapPanel.add(searchPanel);

        addPanel.setLayout(new javax.swing.BoxLayout(addPanel, javax.swing.BoxLayout.PAGE_AXIS));

        jPanel4.setName(""); // NOI18N
        jPanel4.setPreferredSize(new java.awt.Dimension(225, 30));
        jPanel4.setRequestFocusEnabled(false);

        jLabel7.setFont(new java.awt.Font("长城特粗黑体", 0, 18)); // NOI18N
        jLabel7.setText("添加时间段");
        jLabel7.setRequestFocusEnabled(false);
        jPanel4.add(jLabel7);

        addPanel.add(jPanel4);

        addContentPanel.setPreferredSize(new java.awt.Dimension(225, 405));
        addContentPanel.setRequestFocusEnabled(false);

        jLabel8.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel8.setText("时间");

        beginHourField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        beginHourField.setPreferredSize(new java.awt.Dimension(50, 30));

        jLabel9.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel9.setText("国家");

        jLabel12.setText(":");

        beginMinField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        beginMinField.setPreferredSize(new java.awt.Dimension(50, 30));

        jLabel13.setText("至");

        endHourField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        endHourField.setPreferredSize(new java.awt.Dimension(50, 30));

        jLabel14.setText(":");

        endMinField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        endMinField.setPreferredSize(new java.awt.Dimension(50, 30));

        jLabel15.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel15.setText("景点");

        siteField.setPreferredSize(new java.awt.Dimension(306, 30));
/*        siteField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                siteFieldActionPerformed(evt);
            }
        });*/

        jLabel16.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel16.setText("早餐");

        transportField.setPreferredSize(new java.awt.Dimension(306, 30));

        jLabel17.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel17.setText("交通");

        breakfastField.setPreferredSize(new java.awt.Dimension(70, 30));

        jLabel18.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel18.setText("午餐");

        lunchField.setPreferredSize(new java.awt.Dimension(70, 30));

        jLabel19.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel19.setText("晚餐");

        dinnerField.setPreferredSize(new java.awt.Dimension(70, 30));
        /*dinnerField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dinnerFieldActionPerformed(evt);
            }
        });*/

        jLabel20.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel20.setText("备注");

        commentField.setColumns(20);
        commentField.setRows(5);
        commentField.setEditable(true);
        commentField.setLineWrap(true);
        //tableScrollPane.setViewportView(commentField);
        tableScrollPane.setViewportView(commentField);
        tableScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        tableScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);

        submitNew.setText("添加");
        submitNew.setPreferredSize(new java.awt.Dimension(57, 28));
        submitNew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
					submitNewActionPerformed(evt);
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
            }
        });

        clearButton.setText("清空");
        clearButton.setPreferredSize(new java.awt.Dimension(57, 28));
        clearButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                clearButtonActionPerformed(evt);
            }
        });

        try{
            countrySelector.setModel(new javax.swing.DefaultComboBoxModel(GuiCreatePlanController.getCountryList()));
        }catch (Exception e){};
        countrySelector.setPreferredSize(new java.awt.Dimension(160, 30));
        countrySelector.addItemListener(new ItemListener(){

            @Override
            public void itemStateChanged(ItemEvent e) {
            	/**
            	 * 修改BY 锦天
            	 */
                //selectedCountryname = (String)e.getItem();
            	selectedCountryname = String.valueOf(countrySelector.getSelectedItem());
                try {
                	System.out.println(selectedCountryname);
                	String[] cities = GuiCreatePlanController.getCityList(selectedCountryname);
                    citySelector.setModel(new DefaultComboBoxModel<String>(cities));
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
                //citySelector.repaint();
            }

        });

        jLabel10.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel10.setText("城市");

        try{
            citySelector.setModel(new javax.swing.DefaultComboBoxModel<String>(GuiCreatePlanController.getCityList("中国")));
        }catch(Exception e){};
        citySelector.setPreferredSize(new java.awt.Dimension(160, 30));

        jLabel21.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        jLabel21.setText("日期");

        try{
            dateSelector.setModel(new javax.swing.DefaultComboBoxModel(GuiCreatePlanController.getDaySelector(plan.getStartdate(),plan.getEnddate())));
        }
        catch(Exception e){}
        dateSelector.setPreferredSize(new java.awt.Dimension(303, 30));

        javax.swing.GroupLayout addContentPanelLayout = new javax.swing.GroupLayout(addContentPanel);
        addContentPanel.setLayout(addContentPanelLayout);
        addContentPanelLayout.setHorizontalGroup(
            addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(addContentPanelLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(submitNew, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(85, 85, 85)
                .addComponent(clearButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(68, 68, 68))
            .addGroup(addContentPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addContentPanelLayout.createSequentialGroup()
                            .addComponent(jLabel20)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(commentScrollPane))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addContentPanelLayout.createSequentialGroup()
                            .addComponent(jLabel16)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(breakfastField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jLabel18)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(lunchField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(11, 11, 11)
                            .addComponent(jLabel19)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(dinnerField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addContentPanelLayout.createSequentialGroup()
                            .addComponent(jLabel17)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(transportField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addContentPanelLayout.createSequentialGroup()
                            .addComponent(jLabel15)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(siteField, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addContentPanelLayout.createSequentialGroup()
                            .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(addContentPanelLayout.createSequentialGroup()
                                    .addComponent(jLabel9)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(countrySelector, 0, 1, Short.MAX_VALUE))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addContentPanelLayout.createSequentialGroup()
                                    .addComponent(jLabel8)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(beginHourField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jLabel12)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(beginMinField, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(addContentPanelLayout.createSequentialGroup()
                                    .addGap(20, 20, 20)
                                    .addComponent(jLabel13)
                                    .addGap(20, 20, 20)
                                    .addComponent(endHourField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jLabel14)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(endMinField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(addContentPanelLayout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jLabel10)
                                    .addGap(12, 12, 12)
                                    .addComponent(citySelector, 0, 1, Short.MAX_VALUE)))))
                    .addGroup(addContentPanelLayout.createSequentialGroup()
                        .addComponent(jLabel21)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(dateSelector, 0, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        addContentPanelLayout.setVerticalGroup(
            addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(addContentPanelLayout.createSequentialGroup()
                .addGap(7, 7, 7)
                .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(dateSelector, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(beginMinField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(endHourField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13)
                    .addComponent(endMinField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14)
                    .addComponent(jLabel8)
                    .addComponent(jLabel12)
                    .addComponent(beginHourField, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(countrySelector, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10)
                    .addComponent(citySelector, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(siteField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(transportField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(breakfastField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lunchField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(dinnerField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18)
                    .addComponent(jLabel19)
                    .addComponent(jLabel16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(addContentPanelLayout.createSequentialGroup()
                        .addComponent(commentScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(addContentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(submitNew, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(clearButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jLabel20))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        addPanel.add(addContentPanel);

        tablePanel.setLayout(new javax.swing.BoxLayout(tablePanel, javax.swing.BoxLayout.Y_AXIS));

        jPanel13.setMinimumSize(new java.awt.Dimension(134, 35));
        jPanel13.setPreferredSize(new java.awt.Dimension(823, 40));

        
        try{
            jumpDateSelector.setModel(new DefaultComboBoxModel(GuiModifyPlanController.getDaySelector(plan.getStartdate(),plan.getEnddate())));
        }catch(Exception e){}
        jumpDateSelector.setName(""); // NOI18N
        jumpDateSelector.setPreferredSize(new java.awt.Dimension(130, 28));
        jPanel13.add(jumpDateSelector);

        jumpButton.setText("转到");
        jumpButton.setPreferredSize(new java.awt.Dimension(57, 28));
        jumpButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
					jumpButtonActionPerformed(evt);
				} catch (IOException e) {
					e.printStackTrace();
				}
            }
        });
        jPanel13.add(jumpButton);

        tablePanel.add(jPanel13);

        try{
            table.setModel(GuiCreatePlanController.getUpdatedDayModel(plan.getPlanid(), (String)dateSelector.getSelectedItem()));
        }catch(Exception e){};
        table.getTableHeader().setReorderingAllowed(false);
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

        //commentScrollPane.setViewportView(table);
        commentScrollPane.setViewportView(commentField);
        commentScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        commentScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);

/*        table.getColumnModel().getColumn(0).setResizable(false);
        table.getColumnModel().getColumn(0).setPreferredWidth(100);
        table.getColumnModel().getColumn(1).setResizable(false);
        table.getColumnModel().getColumn(2).setResizable(false);
        table.getColumnModel().getColumn(3).setResizable(false);
        table.getColumnModel().getColumn(4).setResizable(false);
        table.getColumnModel().getColumn(5).setResizable(false);
        table.getColumnModel().getColumn(6).setResizable(false);
        table.getColumnModel().getColumn(7).setResizable(false);
        table.getColumnModel().getColumn(7).setPreferredWidth(200);*/
        tableScrollPane.setViewportView(table);
        tableScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        tableScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);

        tablePanel.add(tableScrollPane);

        jPanel11.setPreferredSize(new java.awt.Dimension(823, 50));

        cancel.setText("取消创建");
        cancel.setPreferredSize(new java.awt.Dimension(80, 30));
        cancel.addActionListener(new ActionListener(){

			@Override
			public void actionPerformed(ActionEvent e) {
				try {
					cancelActionPerformed();
				} catch (IOException e1) {
					e1.printStackTrace();
				}
			}
        	
        });
        

        sumbitButton.setText("设置完毕");
        sumbitButton.setMaximumSize(new java.awt.Dimension(80, 28));
        sumbitButton.setPreferredSize(new java.awt.Dimension(80, 30));
        sumbitButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
					sumbitButtonActionPerformed(evt);
				} catch (IOException e) {
					e.printStackTrace();
				}
            }
        });

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap(281, Short.MAX_VALUE)
                .addComponent(sumbitButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(103, 103, 103)
                .addComponent(cancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(286, 286, 286))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(sumbitButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        tablePanel.add(jPanel11);
        
        searchDate.setFormats(new SimpleDateFormat("yyyy-MM-dd EE"));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(tablePanel, javax.swing.GroupLayout.DEFAULT_SIZE, 830, Short.MAX_VALUE)
                    .addComponent(headerPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(titlePlan, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(addPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                       .addComponent(mapPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 461, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(titlePlan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(headerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                   .addComponent(mapPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 441, Short.MAX_VALUE)
                    .addComponent(addPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tablePanel, javax.swing.GroupLayout.DEFAULT_SIZE, 447, Short.MAX_VALUE)
                .addContainerGap())
        );
    }// </editor-fold>                        

    private void cancelActionPerformed() throws IOException {
		JOptionPane.showMessageDialog(this, "已取消创建计划："+plan.getPlantitle()+"!", "取消创建", JOptionPane.PLAIN_MESSAGE);
		try {
			GuiCreatePlanController.deletePlan(plan.getPlanid());
		} catch (Exception e) {
			e.printStackTrace();
		}
		/**
		 * 跳转界面至所有计划列表
		 */
		this.parent.displayPlanList(parent);
		
	}

/*	private void dinnerFieldActionPerformed(java.awt.event.ActionEvent evt) {                                            
        // TODO add your handling code here:
    }                                           

    private void siteFieldActionPerformed(java.awt.event.ActionEvent evt) {                                          
        // TODO add your handling code here:
    }  */                                       

    private void submitNewActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                                          
           	String date = (String)dateSelector.getSelectedItem();
    	String beginH = beginHourField.getText();//NOT NULL
    	String beginM = beginMinField.getText();//NOT NULL
    	String endH = endHourField.getText();//NOT NULL
    	String endM = endMinField.getText();//NOT NULL
    	String citi = (String)citySelector.getSelectedItem();//NOT NULL
    	String spoty = siteField.getText();
    	String trans = transportField.getText();
    	String brkfst = breakfastField.getText();
    	String lun = lunchField.getText();
    	String dinn = dinnerField.getText();
    	String comm = commentField.getText();
    	
    	
    	
    	if(beginH.isEmpty()||beginM.isEmpty()||endH.isEmpty()||endM.isEmpty())
    		JOptionPane.showMessageDialog(this, "请填写开始时间和结束时间", "请填写时间", JOptionPane.WARNING_MESSAGE);
    	else{
    		if(GuiCreatePlanController.validTime(beginH, beginM, endH, endM)<=0){
        		switch(GuiCreatePlanController.validTime(beginH, beginM, endH, endM)){
        		case 0:
        			JOptionPane.showMessageDialog(this, "结束时间请不要小于开始时间", "时间错误", JOptionPane.WARNING_MESSAGE);
        			break;
        		case -1:
        			JOptionPane.showMessageDialog(this, "结束时间不符合格式", "时间错误", JOptionPane.WARNING_MESSAGE);
        			break;
        		case -2:
        			JOptionPane.showMessageDialog(this, "开始时间不符合格式","时间错误", JOptionPane.WARNING_MESSAGE);
        			break;
        		case -3:
        			JOptionPane.showMessageDialog(this, "0<=小时<=23,0<=分钟<=59", "时间错误", JOptionPane.WARNING_MESSAGE);
        			break;
        		case -100:
        			JOptionPane.showMessageDialog(this, "时间请输入数字", "时间错误", JOptionPane.WARNING_MESSAGE);
        			break;
        		default:
        			break;
        		}
    		}
    		else{
                        try {
                            if(GuiCreatePlanController.insertPhase(plan.getPlanid(), date, beginH, beginM, endH, endM, citi, spoty, trans, brkfst, lun, dinn, comm)){
                                JOptionPane.showMessageDialog(this, "成功设置"+date+" "+beginH+":"+beginM+"至"+endH+":"+endM+"的行程！", "行程设置成功", JOptionPane.PLAIN_MESSAGE);
                                
                                DefaultTableModel model = GuiCreatePlanController.getUpdatedDayModel(plan.getPlanid(), date);
                                table.setModel(model);
                                table.repaint();
                                
                                //mf.show(citi);
                            }
                            else
                                    JOptionPane.showMessageDialog(this, ""+date+" "+beginH+":"+beginM+"至"+endH+":"+endM+"的行程已经存在", "行程设置失败", JOptionPane.WARNING_MESSAGE);
                        } catch (IOException ex) {
                            Logger.getLogger(SetPlanPanel.class.getName()).log(Level.SEVERE, null, ex);
                        }

    		}
    	}
    }                                         

    private void clearButtonActionPerformed(java.awt.event.ActionEvent evt) {                                            
        dateSelector.setSelectedIndex(0);
    	
    	beginHourField.setText(null);
    	
    	beginMinField.setText(null);
    	
    	endHourField.setText(null);
    	
    	endMinField.setText(null);
    	
    	countrySelector.setSelectedItem("中国");
        try {
            citySelector.setModel(new javax.swing.DefaultComboBoxModel(GuiCreatePlanController.getCityList("中国")));
        } catch (IOException ex) {
            Logger.getLogger(SetPlanPanel.class.getName()).log(Level.SEVERE, null, ex);
        }
    	
    	transportField.setText(null);
    	
    	siteField.setText(null);
    	
    	breakfastField.setText(null);
    	
    	lunchField.setText(null);
    	
    	dinnerField.setText("");	
    	commentField.setText(null);
    }                                           

    private void sumbitButtonActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                                             
        JOptionPane.showMessageDialog(this, plan.getPlantitle()+"计划创建成功！", "成功创建计划", JOptionPane.PLAIN_MESSAGE);
        try {
            //跳转前需要更新plan
            plan = GuiCreatePlanController.getPlan(plan.getPlanid());
        } catch (IOException ex) {
            Logger.getLogger(SetPlanPanel.class.getName()).log(Level.SEVERE, null, ex);
        }
    	//-------------这段是界面跳转代码-----------
		this.parent.displayPlan(parent,plan);
		//---------------------------------------*/
    }                                            

    private void jumpButtonActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                                           
       String date = (String)jumpDateSelector.getSelectedItem();
       table.setModel(GuiCreatePlanController.getUpdatedDayModel(plan.getPlanid(), date));
       table.repaint();
       /**
        * 刷新表格 获取某日信息
        */
    }                                          

    private void searchCityFocusGained(java.awt.event.FocusEvent evt) {                                       
        if(searchCity.getText().equals("请输入城市名称"))
            searchCity.setText(null);
    }                                      
                                     

    /**
     * 搜索计划按钮
     * @param evt
     * @throws IOException 
     */
    private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                                             
       if(searchCity.getText().isEmpty()||searchCity.getText().equals("请输入城市名称")){
    		   JOptionPane.showMessageDialog(this, "请输入指定日期和当日所在城市名称，或输入某个城市名称", "搜索失败", JOptionPane.PLAIN_MESSAGE);
    	   
       }
       else{
    	   ArrayList<Plan> resultList = GuiCreatePlanController.searchPlanByCityDate(searchCity.getText(),searchDate.getDate());
           if(resultList!=null){
        	   initSearchResultDialog(resultList);
        	   searchResultDialog.setVisible(true);
           }
           else{
        	   JOptionPane.showMessageDialog(this, "无法找到符合条件的计划", "搜索失败", JOptionPane.PLAIN_MESSAGE);
           }
       }
    }                                            

    /**
     * 初始化搜索计划结果窗口
     * @param resultList
     */
    private void initSearchResultDialog(ArrayList<Plan> resultList){
    	searchResultDialog.setMinimumSize(new java.awt.Dimension(850, 600));
    	searchResultDialog.setPreferredSize(new java.awt.Dimension(850, 1000));
    	searchResultDialog.setTitle("搜索结果");
        //searchResultDialog.setResizable(false);

        resultDialogLayout = new CardLayout();
        searchResultDialog.getContentPane().setLayout(resultDialogLayout);
        searchResultDialog.getContentPane().add(new DisplaySearchedPlanListPanel(parent,resultList),"搜索计划");
        resultDialogLayout.show(searchResultDialog.getContentPane(), "搜索计划");
        
        searchResultDialog.addWindowListener(new WindowListener(){

			@Override
			public void windowOpened(WindowEvent e) {}

			@Override
			public void windowClosing(WindowEvent e) {
				searchResultDialog = new JDialog();
			}

			@Override
			public void windowClosed(WindowEvent e) {}

			@Override
			public void windowIconified(WindowEvent e) {}

			@Override
			public void windowDeiconified(WindowEvent e) {}

			@Override
			public void windowActivated(WindowEvent e) {}

			@Override
			public void windowDeactivated(WindowEvent e) {}
        	
        });
        
        /*javax.swing.GroupLayout searchResultDialogLayout = new javax.swing.GroupLayout(searchResultDialog.getContentPane());
        searchResultDialog.getContentPane().setLayout(searchResultDialogLayout);
        searchResultDialogLayout.setHorizontalGroup(
            searchResultDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 850, Short.MAX_VALUE)
        );
        searchResultDialogLayout.setVerticalGroup(
            searchResultDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1000, Short.MAX_VALUE)
        );searchResultDialog.getContentPane().add(new DisplaySearchedPlanListPanelNetbeans());*/
    }
    
    
    // Variables declaration - do not modify                     
    private javax.swing.JPanel addContentPanel;
    private javax.swing.JPanel addPanel;
    private javax.swing.JTextField beginHourField;
    private javax.swing.JTextField beginMinField;
    private javax.swing.JTextField breakfastField;
    private javax.swing.JButton cancel;
    private javax.swing.JComboBox citySelector;
    private javax.swing.JButton clearButton;
    private javax.swing.JTextArea commentField;
    private javax.swing.JScrollPane tableScrollPane;
    private javax.swing.JComboBox countrySelector;
    private javax.swing.JComboBox dateSelector;
    private javax.swing.JTextField dinnerField;
    private javax.swing.JTextField endHourField;
    private javax.swing.JTextField endMinField;
    private javax.swing.JPanel headerPanel;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JButton jumpButton;
    private javax.swing.JComboBox jumpDateSelector;
    private javax.swing.JTextField lunchField;
    private javax.swing.JPanel mapPanel;
    private javax.swing.JButton searchButton;
    private javax.swing.JTextField searchCity;
    private JXDatePicker searchDate;
    private javax.swing.JPanel searchPanel;
    private javax.swing.JDialog searchResultDialog;
    private javax.swing.JTextField siteField;
    private javax.swing.JButton submitNew;
    private javax.swing.JButton sumbitButton;
    private javax.swing.JTable table;
    private javax.swing.JPanel tablePanel;
    private javax.swing.JScrollPane commentScrollPane;
    private javax.swing.JLabel titleLb;
    private javax.swing.JPanel titlePlan;
    private javax.swing.JTextField transportField;
    
    private CardLayout resultDialogLayout;
    // End of variables declaration                   
}
